package com.xuecheng.api.content;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.content.model.vo.CourseBaseVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 课程基本信息Api接口
 * </p>
 *
 * @Description:
 */
@Api(value = "课程基本信息Api接口", tags = "内容-课程基本业务信息Api接口", description = "课程基本业务信息Api接口")
public interface CourseBaseApi {

    /**
     * 分页条件查询课程基本信息
     *
     * @param params
     * @param model
     * @return
     */
    @ApiOperation("分页条件查询课程基本信息")
    @ApiImplicitParams(
            @ApiImplicitParam(name = "model",
                    value = "课程基本信息查询条件",
                    required = true,
                    dataType = "QueryCourseModel",
                    paramType = "body")
    )
    PageVO queryCourseBaseList(PageRequestParams params, QueryCourseModel model);


    /**
     * 添加课程
     *
     * @return
     */
    @ApiOperation(value = "添加课程课程基本信息")
    @ApiImplicitParam(name = "courseBaseVO", value = "前端传递的vo对象", required = true, dataType = "CourseBaseVO", paramType = "body")
    CourseBaseDTO createCourseBase(CourseBaseVO courseBaseVO);

    /**
     * 更新录播课程
     *
     * @param courseBaseVO
     * @return
     */
    @ApiOperation("更新课程基本信息")
    @ApiImplicitParam(name = "courseBaseVO", value = "课程基本信息VO", required = true, dataType = "CourseBaseVO", paramType = "body")
    CourseBaseDTO modifyCourseBase(CourseBaseVO courseBaseVO);

    @ApiOperation(value = "根据课程Id获取课程基本信息")
    @ApiImplicitParam(name = "courseBaseId", value = "课程基本信息ID", required = true, dataType = "Long", paramType = "path", example = "1")
    CourseBaseDTO getCourseBaseById(Long courseBaseId);

    @ApiOperation(value = "根据Id删除课程基本信息")
    @ApiImplicitParam(name = "courseBaseId", value = "课程基本信息ID", required = true, dataType = "Long", paramType = "path", example = "1")
    void removeCourseBaseById(Long courseBaseId);


    @ApiOperation(value = "教学机构提交课程信息")
    @ApiImplicitParam(name = "courseBaseId", value = "课程基本信息ID", required = true, dataType = "Long", paramType = "path", example = "1")
    void commitCourseBase(Long courseBaseId);

    @ApiOperation("课程预览")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "courseBaseId", value = "课程基本信息ID", required = true, dataType = "Long", paramType = "path", example = "1"),
            @ApiImplicitParam(name = "companyId", value = "机构ID", required = true, dataType = "Long", paramType = "path", example = "1")
    })
    Object preview(Long courseBaseId, Long companyId);


    @ApiOperation(value = "课程发布")
    @ApiImplicitParam(name = "courseBaseId", value = "课程基本信息ID", required = true, dataType = "Long", paramType = "path", example = "1")
    void publish(Long courseBaseId);
}


